home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWResour / Include / FWResSin.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  1.4 KB  |  61 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:        FWResSin.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWRESSIN_H
  11. #define FWRESSIN_H
  12.  
  13. #ifndef FWRESACC_H
  14. #include "FWResAcc.h"
  15. #endif
  16.  
  17. #ifndef FWASINKS_H
  18. #include "FWASinks.h"
  19. #endif
  20.  
  21. #if FW_LIB_EXPORT_PRAGMAS
  22. #pragma lib_export on
  23. #endif
  24.  
  25. //========================================================================================
  26. //    CLASS FW_CResourceSink
  27. //========================================================================================
  28.  
  29. class FW_CLASS_ATTR FW_CResourceSink : public FW_CRandomAccessSink
  30. {
  31.  
  32. public:
  33.  
  34.     FW_CResourceSink(FW_CResource& resource);
  35.     virtual ~ FW_CResourceSink();
  36.     
  37.     virtual void Read(void * destination, long count);
  38.     
  39.     virtual long GetWritableBytes() const;
  40.     virtual void Write(const void* source, long count);
  41.  
  42.     virtual long GetLength() const;
  43.     virtual void SetLength(long length);
  44.     virtual long GetPosition() const;
  45.     virtual void SetPosition(long position);
  46.     
  47. private:
  48.     FW_CResource    fResource;
  49.     FW_CMemorySink    fMemorySink;
  50.     
  51.     FW_CResourceSink(const FW_CResourceSink& sink);
  52.     FW_CResourceSink& operator=(const FW_CResourceSink& sink);
  53.         // Shouldn't copy this class.
  54. };
  55.  
  56. #if FW_LIB_EXPORT_PRAGMAS
  57. #pragma lib_export off
  58. #endif
  59.  
  60. #endif
  61.